<template>
	<view>
		<view class="uni-padding-wrap uni-common-mt">
			<view class="uni-btn-v">
				<navigator url="navigate/navigate">
					<button type="default">跳转到新页面</button>
				</navigator>
				<navigator url="redirect/redirect" open-type="redirect">
					<button type="default">在当前页打开</button>
				</navigator>
				<navigator url="redirect/redirect" open-type="reLaunch">
					<button type="default">新建调用栈</button>
				</navigator>
				<navigator url="/pages/tabBar/tabcompage/tabcompage" open-type="switchTab">
					<button type="default">跳转tab页面</button>
				</navigator>
			</view>
		</view>
	    <view v-for="index in 20">
			<view style="height:150rpx;background-color:aquamarine;margin: 5rpx;">
				测试数据{{index}}
			</view>
		</view>
		<view style="text-align: center;color: #aaa;margin: 50rpx;">---真的没了</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'navigator',
			}
		},
		onLoad(options){//用来初始化数据
			console.log("navigator页面加载");
		},
		onShow(){ 
			console.log("navigator------onShow");
		},
		onPullDownRefresh(){//下拉刷新
			console.log("navigator------onPullDownRefresh开始刷新");
			//数据更新
			setTimeout(()=>{
				uni.stopPullDownRefresh();
				console.log("navigator------刷新完成");
			},2000)
		},
		onReachBottom(){
			//数据加载
			console.log("到底了。。。。。。。。");
			if(this.count<200)
			this.count=this.count+20;
		},
		// onReady(){
		// 	console.log("navigator------onReady");
		// },
		// onHide(){//保存用户信息
		// 	console.log("navigator------onHide");
		// },
		// onUnload(){
		// 	console.log("navigator------onUnload");
		// },
		methods:{
			
		}
	}
</script>
